[Vanilla Bugfix] Fix Buggy Spotlight Behavior w/Event 35 - Enemy In Spotlight - #6
[Vanilla Bugfix] Fix Buggy Spotlight Behavior w/Event 35 - Enemy In Spotlight#6krnyoshi wants to merge 2 commits into
Conversation
|
Development builds of 647b5f1: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
|
Changelog note, please |
|
Right so, I am not well-versed in triggers, unfortunately, but something an AI review found. The Follow restriction keys on
That's fine for the detection path, where
In all three, Follow used to reach every tagged spotlight and now reaches none. Since Plus needs docs - 52.md, 35.md, trigger-springing.md, and the chanelog note. Remember to rebase, I bumped the version. There is also this AI found: Consideration: could the Not blocking, but worth a decision either way. On a trigger with exactly one event the tripped bit can never do the job it exists for — there's no second event waiting to catch up — so all it can do is make Gating the write rather than patching the read would cover all of them:
The counter-argument is real though: that changes behavior for 28 events at once, and some existing map may accidentally depend on the current latch. Staying narrow is defensible — I'd just want it to be an explicit decision, with a comment saying the latch is meaningless on a single-event trigger and that the clause is deliberately scoped to Event 35 for now. In that case But I frankly again, don't understand triggers well enough to understand what in the world this implies. |
|
Thanks for the review, Ziv. I went back through the spotlight-trigger path and adjusted the implementation based on your comments. For That fixes the paths you pointed out such as elapsed-time completion and forced triggers, where the action may legitimately run with I also kept the After making the changes, I went ahead and did another test on the spotlight behavior with two towers sharing the same tag. The following cases are now working as intended:
I also tested the multi-event case you mentioned:
With added context that:
With a persistent/repeating trigger, S1 detects U1 and follows normally. After five seconds, the trigger fires, but Event 35 remains latched while the elapsed-time event is reset. The trigger then continues firing every five seconds. Once S1 loses U1 and returns to Sweep, those repeated timer completions keep resetting spotlight behavior. S2 can still detect U1 or U2, but once this repeating state begins, only one spotlight appears able to actively detect/follow at a time while the other is affected by the repeated resets. My current understanding is that the persistent trigger remembers only that Event 35 was satisfied, not which spotlight satisfied it. When the timer later completes with However, I also tested the same kind of multi-event setup using Event 54 ( That makes me wonder if these two spotlight events are intended to serve different roles:
If that distinction is intentional, I do not think adding persistent source tracking to Event 35 would be necessary. That would require storing which spotlight originally satisfied Event 35 across later trigger polls and would broaden this PR into trigger-state handling, potentially affecting serialization, CRC/network state, invalid-object handling, and shared-tag semantics. Would you consider Event 35 effectively intended for the immediate/single-event case, with Event 54 being the appropriate spotlight event for multi-event triggers? If so, I would keep this PR narrow and document that distinction rather than adding persistent source tracking. I’ll update |
Summary
This PR fixes several spotlight trigger issues affecting
Enemy In Spotlight (Event 35). This is much more noticeable when multiple light towers share the same tag.It changes spotlight Follow handling so only the tower that actually detected the enemy begins tracking it, prevents a Follow-to-Sweep transition from immediately re-detecting in the same frame, and stops a latched single-event Event 35 trigger from firing again on unrelated event polls.
Reviewers should expect more stable spotlight behavior with shared tags. There shouldn't be unrelated tower spotlight position resetting or spazzing (when under repeated fire), and there shouldn't be anymore repeated trigger spam after a prior detection. Event 35’s existing persistent/multi-event latching behavior remains intact.
Video of the Issue:
issue.mp4
Behavior and compatibility
This is a Vanilla bug fix.
Fixes incorrect
Enemy In Spotlight (Event 35)behavior affecting shared spotlight tags and persistent triggers.Validation
Environment: Windows 10, Visual Studio 2022, OpenTS x86 Release build.
Build: cmake --build build --config Release
Test configuration: Two spotlight towers sharing the same tag,
Event 35 (Enemy In Spotlight), persistence set to Repeat, withChange Spotlight Behavior -> Follow.Result: Verified that only the detecting spotlight enters Follow, the second spotlight continues sweeping without resetting, Follow returns to Sweep without looping/re-triggering, and subsequent unrelated attacks do not cause repeated Event 35 activations.
Video of the fix:
fix.mp4
Documentation
Checklist